
function InstallHeader()
{
    var login = document.getElementById("login");

    var s = document.cookie;
    var i = s.indexOf("user=",0);
    if(i>=0){
        i=i+5
        var j = s.indexOf(".",i);
        var logname = s.substr(i, j-i);
        login.innerHTML =  "user: "+logname +' <a href="./xlogin"><small>(logout)</small></a>'  ;
    } else {
      login.innerHTML =  '<a href="./xlogin">Please login</a>'  ;
    }
}

InstallHeader();
